package com.eoe.wiki.view;

import android.view.View;
import android.view.ViewGroup;

public class SliderEntity{

	protected ViewGroup view;
	protected int width;
	protected int closeX;
	protected int openX;
	protected int y;
	public SliderEntity(ViewGroup view, int closeX, int openX, int y) {
		if(view ==null){
			throw new NullPointerException("incalid view");
		}
		this.view = view;
		this.closeX = closeX;
		this.openX = openX;
		this.y = y;
	}
	public ViewGroup getView() {
		return view;
	}
	public void setView(ViewGroup view) {
		if(view ==null){
			throw new NullPointerException("incalid view");
		}
		this.view = view;
	}
	public int getWidth() {
		if(this.width<=0){
			this.width = view.getMeasuredWidth();
		}
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getCloseX() {
		return closeX;
	}
	public void setCloseX(int closeX) {
		this.closeX = closeX;
	}
	public int getOpenX() {
		return openX;
	}
	public void setOpenX(int openX) {
		this.openX = openX;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	
	
}
